Cable tester

ABSTRACT

A physical layer device communicates over a cable and includes a cable tester that determines a cable status, which includes an open status, a short status and a normal status. The cable tester includes a pretest module that senses activity on the cable and selectively enables testing based on the sensed activity. A test module is enabled by the pretest module, transmits a test pulse on the cable, measures a reflection amplitude, calculates a cable length, and determines the cable status based on the measured amplitude and the calculated cable length. A digital signal processor (DSP) communicates with the cable and that has a digital gain parameter. A cable length estimator communicates with the DSP and estimates cable length based on the digital gain parameter.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of U.S. patent application Ser. No.10/400,367, filed Mar. 27, 2003, which is a continuation-in-part of U.S.patent application Ser. No. 10/331,221, filed Dec. 30, 2002, which is acontinuation-in-part of U.S. patent application Ser. No. 10/165,467,filed Jun. 7, 2002 now U.S. Pat. No. 6,825,672. The disclosures of theabove applications are incorporated herein by reference in theirentirety.

FIELD OF THE INVENTION

The present invention relates to electronic diagnostic systems, and moreparticularly to testing equipment for cable used in a network.

BACKGROUND OF THE INVENTION

One goal of a network manager is to control total cost of ownership ofthe network. Cabling problems can cause a significant amount of networkdowntime and can require troubleshooting resources, which increase thetotal cost of ownership. Providing tools that help solve cablingproblems more quickly will increase network uptime and reduce the totalcost ownership.

Referring now to FIG. 1, conventional cable testers 10 are frequentlyused to isolate cabling problems. The cable testers 10 are coupled by aconnector 12 (such as an RJ-45 or other connector) to a cable 14. Aconnector 15 connects the cable to a load 16. Conventional cable testerstypically require the load 16 to be a remote node terminator or a loopback module. Conventional cable tests may generate inaccurate resultswhen the cable is terminated by an active link partner that isgenerating link pulses during a test. The cable tester 10 performs cableanalysis and is able to detect a short, an open, a crossed pair, or areversed pair. The cable tester 10 can also determine a cable length toa short or open.

A short condition occurs when two or more lines are short-circuitedtogether. An open condition occurs when there is a lack of continuitybetween ends at both ends of a cable. A crossed pair occurs when a paircommunicates with different pins at each end. For example, a first paircommunicates with pins 1 and 2 at one end and pins 3 and 6 at the otherend. A reversed pair occurs when two ends in a pair are connected toopposite pins at each end of the cable. For example, a line on pin 1communicates with pin 2 at the other end. A line on pin 2 communicateswith pin 1 at the other end.

The cable tester 10 employs time domain reflection (TDR), which is basedon transmission line theory, to troubleshoot cable faults. The cabletester 10 transmits a pulse 17 on the cable 14 and measures an elapsedtime until a reflection 18 is received. Using the elapsed time and acable propagation constant, a cable distance can be estimated and afault can be identified. Two waves propagate through the cable 14. Aforward wave propagates from a transmitter in the cable tester 10towards the load 16 or fault. A return wave propagates from the load 16or fault to the cable tester 10.

A perfectly terminated line has no attenuation and an impedance that ismatched to a source impedance. The load is equal to the line impedance.The return wave is zero for a perfectly terminated line because the loadreceives all of the forward wave energy. For open circuits, the returnwave has an amplitude that is approximately equal to the forward wave.For short circuits, the return wave has a negative amplitude is alsoapproximately equal to the forward wave.

In transmission line theory, a reflection coefficient is defined as:

$T_{L} = {\frac{R\_ wave}{F\_ wave} = {\frac{V_{-}}{V_{+}} = \frac{Z_{L} - Z_{O}}{Z_{L} + Z_{O}}}}$

Where Z_(L) is the load impedance and Z_(O) is the cable impedance. Thereturn loss in (dB) is defined as:

${R_{L}({db})} = {{20\;{LOG}_{10}{\frac{1}{T_{L}}}} = {20\;{LOG}_{10}{\frac{Z_{L} + Z_{O}}{Z_{L} - Z_{O}}}}}$

Return loss performance is determined by the transmitter return loss,the cable characteristic impedance and return loss, and the receiverreturn loss. IEEE section 802.3, which is hereby incorporated byreference, specifies receiver and transmitter minimum return loss forvarious frequencies. Additional factors that may affect the accuracy ofthe return loss measurement include connectors and patch panels. Cableimpedance can also vary, for example CAT5 UTP cable impedance can vary±15 Ohms.

Consumers can now purchase lower cost switches, routers, network devicesand network appliances that include physical layer devices with portsthat are connected to cable. When connecting these network devices tocable, the same types of cabling problems that are described above mayoccur. In these lower cost applications, the consumer typically does nothave a cable tester or want to purchase one. Therefore, it is difficultto identify and diagnose cable problems without simply swapping thequestionable cable with a purportedly operating cable. If thepurportedly operating cable does not actually work, the consumer mayincorrectly conclude that the network device is not operating and/orexperience further downtime until the cable problem is identified.

SUMMARY OF THE INVENTION

A physical layer device according to the present invention communicatesover a cable and includes a cable tester that determines a cable status,which includes an open status, a short status and a normal status. Thecable tester includes a pretest module that senses activity on the cableand selectively enables testing based on the sensed activity. A testmodule is enabled by the pretest module, transmits a test pulse on thecable, measures a reflection amplitude, calculates a cable length, anddetermines the cable status based on the measured amplitude and thecalculated cable length. A digital signal processor (DSP) communicateswith the cable and that has a digital gain parameter. A cable lengthestimator communicates with the DSP and estimates cable length based onthe digital gain parameter.

In other features, an indicator displays at least one of the cablestatus, the estimated cable length, the calculated cable length and themeasured reflection amplitude.

A physical layer device according to the present invention communicatesover a cable and includes a cable tester that determines a cable status,which includes an open status, a short status and a normal status. Thecable tester includes a pretest module that senses activity on the cableand selectively enables testing based on the sensed activity. A testmodule is enabled by the pretest module, transmits a test pulse on thecable, measures a reflection amplitude, calculates a cable length, anddetermines the cable status based on the measured amplitude and thecalculated cable length. A first digital signal processor (DSP)communicates with a first pair of the cable and includes a first echocanceller and a first finite impulse response filter with first taps. Asecond DSP communicates with a second pair of the cable and includes asecond echo canceller and a second finite impulse response filter withsecond taps. At least one of the physical layer device and the cabletester estimates skew between the first and second pairs based on valuesof the first and second taps.

In other features, an indicator displays at least one of the cablestatus, the estimated skew, the calculated cable length and the measuredreflection amplitude.

A physical layer device according to the present invention communicatesover a cable and includes a cable tester that determines a cable status,which includes an open status, a short status and a normal status. Thecable tester includes a pretest module that senses activity on the cableand selectively enables testing based on the sensed activity. A testmodule is enabled by the pretest module, transmits a test pulse on thecable, measures a reflection amplitude, calculates a cable length, anddetermines the cable status based on the measured amplitude and thecalculated cable length. A first digital signal processor (DSP)communicates with a first pair of the cable and includes a first echocanceller having a finite impulse response (FIR) filter with taps and afirst crosstalk canceller having a FIR filter with taps. A second DSPcommunicates with a second pair of the cable and includes a second echocanceller having a FIR filter with taps and a second crosstalk cancellerhaving a FIR filter with taps. The cable tester calculates a distance toat least one of echo and crosstalk based on values of the taps of thefirst echo canceller and the second crosstalk canceller.

In other features, an indicator displays at least one of the status, theecho distance, the crosstalk distance, the calculated cable length andthe measured reflection amplitude.

Further areas of applicability of the present invention will becomeapparent from the detailed description provided hereinafter. It shouldbe understood that the detailed description and specific examples, whileindicating the preferred embodiment of the invention, are intended forpurposes of illustration only and are not intended to limit the scope ofthe invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will become more fully understood from thedetailed description and the accompanying drawings, wherein:

FIG. 1 is a functional block diagram of a cable tester according to theprior art;

FIG. 2 is a functional block diagram of a cable tester according to thepresent invention;

FIG. 3 is a state diagram of a pretest state machine;

FIG. 4 is a state diagram of a first test state machine for a cabletester for a media that transmits and receives on the same wire;

FIG. 5 is a state diagram of a second test state machine for a cabletester for a media that does not transmit and receive on the same wire;

FIG. 6 is a waveform diagram illustrating a time-based receiver floor;

FIG. 7 is an exemplary cable reflection amplitude vs. cable lengthrelationship for a first type of cable;

FIG. 8 is a functional block diagram of an exemplary network device thatincludes one or more physical layer devices and that includes a hardwareor software based cable testing switch for initiating cable testing;

FIG. 9 is a flowchart illustrating steps for performing a cable test forthe exemplary network device in FIG. 8;

FIG. 10A is a functional block diagram of an exemplary power overEthernet (POE) device;

FIG. 10B is a flowchart illustrating steps for performing a cable testfor the exemplary network device in FIG. 8 when POE devices are possiblyconnected at remote cable ends;

FIG. 11 is a functional block diagram of an exemplary network devicethat includes one or more physical layer devices and that initiatescable testing at power on;

FIG. 12 is a flowchart illustrating steps for performing a cable testfor the exemplary network device in FIG. 11;

FIG. 13 is a flowchart illustrating steps for performing a cable testfor the exemplary network device in FIG. 11 when POE devices arepossibly connected at remote cable ends;

FIGS. 14A–14E illustrate exemplary LEDs during testing cable testing;

FIG. 15 illustrates the exemplary LEDs showing the results of cabletesting; and

FIG. 16 illustrates exemplary LEDs of a network device that includesmore than one LED per port.

FIG. 17 illustrates steps performed by a cable test module to test forshorts between pairs of the same cable;

FIG. 18 illustrates cable powerdown and powerup steps that are performedwhen a short is detected in FIG. 17;

FIG. 19 illustrates steps of a cable test method employing A out of Bpass/fail criteria;

FIG. 20 illustrates steps of a cable test method that performscalculations on the results of repeated cable tests on the same cable;

FIG. 21 illustrates a state machine with timer that can be disabled whenlink partners are not present;

FIG. 22 is a functional block diagram of an echo and crosstalk distanceestimator;

FIG. 23 is a waveform of an exemplary transmitted signal on a pair withecho signal components;

FIG. 24 is a waveform of an exemplary signal on another pair withcrosstalk signal components;

FIG. 25 is a functional block diagram of a cable test module thatdisplays skew, polarity and crossover status data;

FIG. 26 illustrates steps performed by a cable test module to estimatean insertion loss;

FIG. 27 illustrates steps performed by a cable test module to estimate areturn loss;

FIG. 28A illustrates steps for calibrating cable length as a function ofdigital gain;

FIG. 28B is a waveform illustrating cable length as a function ofdigital gain;

FIG. 29 illustrates steps performed by a cable length estimator;

FIG. 30A illustrates steps for calibrating impedance as a function ofreflection amplitude;

FIG. 30B is a waveform illustrating impedance as a function ofreflection amplitude;

FIG. 31 illustrates steps performed by a cable impedance estimator;

FIG. 32A is a functional block diagram of a cable test module thattriggers an autonegotiation downshift based on a detected open or shortpair during the cable test;

FIG. 32B illustrates steps performed by the cable test module in FIG.32A;

FIG. 33 is a functional block diagram of cable test module thatestimates skew between pairs;

FIG. 34 illustrates steps that are performed by the cable test module toestimate skew;

FIGS. 35 and 36 is a functional block diagram of a cable test module ina multiple port network device with an integrated frequency synthesizerand an insertion loss estimator;

FIG. 37A is a functional block diagram of a cable disconnect detectorusing the cable test module; and

FIG. 37B illustrates steps that are performed by the cable disconnectdetector in FIG. 37A.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The following description of the preferred embodiment(s) is merelyexemplary in nature and is in no way intended to limit the invention,its application, or uses. For purposes of clarity, the same referencenumbers will be used in the drawings to identify the same elements.

Referring now to FIG. 2, a cable tester 20 according to the presentinvention is shown. The cable tester 20 is capable of testing10/100BaseT cable, 1000BaseT cable, and/or other cable media. Forexample, 10/100BaseT includes two pairs of twisted pair wires and1000BaseT cable includes four pairs of twisted pair wires. A transmitter28 and a receiver 30 are coupled to the I/O interface 26. A test module32 includes state machines for testing a media 34 such as cable. Thetest module 32 can be implemented in combinatorial logic, using discretecircuits, and/or using a processor and memory that executes testingsoftware.

The test module 32 includes a pretest state machine or module 50. Thetest module 32 also includes a first test state machine or module 52and/or a second test state machine 54. One or more lookup tables 56containing cable empirical data are also provided as will be describedbelow. The cable tester 20 may also include a display 58 for presentingfault status, cable length and/or reflection amplitude data. The display58 can be a graphical user interface (GUI), a light emitting diode (LED)and/or any other type of display. A cancellation circuit 59 cancels thetest pulse when testing on media that transmits and receives on the samewire such as 1000BaseT. The cancellation circuit 59 is not used whentesting media that transmits and receives on different wires such as in10/100BaseT. The cancellation circuit 59 can be a hybrid circuit.

Referring now to FIG. 3, the pretest state machine 50 is illustrated infurther detail. On reset, the pretest state machine 50 moves to a waitenable state 100. Pair is set equal to zero and testover is set equal toone. When a test enabled signal is received, the pretest state machine50 transitions to a wait powerdown state 102. A powerdown timer isincremented and testover is set equal to zero. The powerdown timershould have a period that is sufficient to bring a link down. When thepowerdown timer exceeds a first period P1, the pretest state machine 50transitions to a first timer start state 104.

A first timer is set equal to zero and a blind timer is incremented. Theblind timer waits for a blind timer period to allow a sufficient amountof time for transitions between pairs. Typically several clock cyclesare sufficient. When wire_activity is high, the pretest state machine 50transitions to a signal find state 106 and resets a second timer.Wire_activity is present when a signal on the wire varies above apredetermined threshold.

When wire_activity is low in the signal find state 106, the preteststate machine 50 transitions back to the signal find state 106 andresets the second timer. If the second timer is greater than a secondperiod P2, the pretest state machine 50 transitions to a test state 110.Tdrwrstart is set equal to one. If a test pass signal is received, thepretest state machine 50 transitions to a test over state 114. Pair isincremented, tdrwrstart is set equal to zero, and the register isrecorded.

If pair is less than 4 for 1000BaseT operation or 2 for 10/100BaseToperation, the pretest state machine 50 transitions from the test overstate 114 to the first timer start state 104. If pair is equal to 4 for1000BaseT operation or 2 for 10/100BaseT operation, the pretest statemachine 50 transitions from the test over state 114 to the wait enablestate 100.

In the first timer start state 104, the pretest state machine 50transitions to the test state 110 if the first timer is greater than athird period P3. In the signal find state 106, the pretest state machine50 transitions to the test over state 114 if the first timer is greaterthan the third period P3.

In a preferred embodiment, the first period P1 is preferably 1.5 s, thesecond period P2 is equal to 5 ms, and the third period is equal to 625ms. Skilled artisans will appreciate that the first, second and thirdperiods P1, P2 and P3, respectively, may be varied. The P3 is preferablyselected based on a worst case spacing of link pulses and a longestduration between MDI/MDIX crossover. P2 is preferably selected to allowtesting between fast link pulses (FLP). FLP bursts have a length of 2 msand a spacing of 16 ms. By setting P2=5 ms, the delay is a total of 7ms, which is approximately half way between FLPs. P1 may be longer than1.5 seconds if required to bring the link down.

Referring now to FIG. 4, the first test state machine 52 for media thattransmits and receives on the same wire is shown. The cancellationcircuit 59 cancels the transmit test pulse. On reset, the first teststate machine 52 transitions to a wait start state 150. Peak is setequal to zero and cutoff is set equal to peak/2. When tdrwr_start_rrising edge is received from the pretest state machine 50, the firsttest state machine 52 transitions to a detect offset state 154.tdr_sel_pulse is set equal to 1 to generate a pulse and start a timer.The pulse is preferably a 128 ns pulse having a 2V amplitude.

After an offset is subtracted from tdr_in, the first test state machine52 transitions to a detect peak state 158. Peak stores the current valueof tdr_in. If tdr_in is less than or equal to peak/2, the first teststate machine 52 transitions to a detect cutoff state 162 where distanceis set equal to a counter. If tdr_in is greater than peak, the firsttest state machine 52 transitions to state 158 and peak is replaced by anew tdr_in. If a timer is greater than a fifth period P5, the first teststate machine 52 transitions to a test over state 166 wherepeak/distance is calculated, tdr_pass is set equal to 1, andtdr_sel_pulse is set equal to 0.

While in the detect cutoff state 162, the first test state machine 52transitions to the detect peak state 158 if tdr_in>peak. While in thedetect peak state 158, the first state machine 52 transitions to thetest over state 166 if the timer is greater than the fifth period P5. Ina preferred embodiment, P5 is equal to 5 μs.

Referring now to FIG. 5, the second test state machine 54 is shown infurther detail. On reset, the second test state machine 54 transitionsto a wait start state 200. Peak is set equal to zero, cutoff is setequal to peak/2, and distance is set equal to 0. When tdrwr_start_rrising edge is received from the pretest state machine 50, the secondtest state machine 54 transitions to a detect offset state 204 wheretdr_in =filtered magnitude and tdr_sel_pulse is set equal to 1 andtdr_sign is set to 1 if ADC input is greater than or equal to offset, 0otherwise. The second test state machine 54 transitions to a firstdetect peak state 208 where peak1 is set equal to maximum of tdr_in andpulse_mid is set equal to tdr_in after 17 clock cycles.

If tdr_in is less than peak1/2 or tdr_sign is set equal to 0, the secondtest state machine 54 transitions to a second detect peak state 212 andsets peak2 equal to maximum of tdr_in. If tdr_in is less than peak2/2,the second test state machine 54 transitions to a detect cutoff state216. Distance is set equal to a counter. If a fourth timer is greaterthan a fourth period P4, the second test state machine 54 transitions toa test over state 220. Peak/distance is calculated, tdr_pass is setequal to 1, and tdr_sel_pulse is set equal to 0.

In the detect cutoff state 216, if tdr_in is greater than peak2, thesecond test state machine 54 transitions to the second peak detect state212. In the second detect peak state 212, if the fourth timer is greaterthan P4, peak2 is equal to 0 and pulse_mid is greater than a threshold,the second test state machine 54 transitions to a second test state 224.In the second test state 224, tdr_sel_half_pulse is set equal to 1 tosend a half pulse and the fourth timer is restarted and incremented andsecond_peak is set to a maximum of tdr_in. The second test state machine54 transitions from the second test state 224 to the test over state 220if the fourth timer is greater than P4 or tdr_in is less thansecond_peak/2.

In the first detect peak state 208, if the fourth timer is greater thanP4, the second test state machine 54 transitions to the test over state220. In the second detect peak state 212, if the fourth timer is greaterthan P4, peak2=0, and pulse_mid is less than or equal to a secondthreshold, the second test state machine 54 transitions to the test overstate 220.

The link is brought down and the pretest state machine 50 waits untilthe line is quiet. For each pair, the cable tester 20 generates a TDRpulse and measures the reflection. In 10/100BaseT media, after the testis enabled, the pretest state machine 50 waits until the line is quiet.A pulse is generated and the reflection is measured. The status receiverand transmitter pairs are determined sequentially. For the first pair,the receiver is preferably in MDIX mode and the transmitter ispreferably in MDI mode. For the second pair, the receiver is preferablyin MDI mode and transmitter is preferably in MDIX mode.

The pretest state machine 50 ensures that the line is quiet before thepulse is transmitted. After the test is enabled, the pretest statemachine 50 waits P1 (such as 1.5 seconds or longer) to make sure thatthe link is brought down. The pretest state machine 50 determineswhether there is activity on a first pair (MDI+/−[0] for 1000BaseTnetwork devices and TX for 10/100BaseT products).

In a preferred embodiment, activity is found when activity minussystemic offset such as a noise floor that is calculated in states 154and 204 is greater than a predetermined threshold. If there is noactivity for P3 (such as 625 ms), the pretest state machine 50 proceedsto the test state and sends a pulse on the selected pair. If there isactivity on the pair and the line is quiet for 5 ms afterwards, thepretest state machine proceeds to the test state. The test fail state isreached and a test failure declared if the line has not been quiet formore than P2 (such as 5 ms) during P3 (such as 625 ms). If a testfailure is declared on the first pair or the TDR test is completed forthe pair, the same procedure is conducted on MDI+/−[1], MDI+/−[2],MDI+/−[3] sequentially for 1000BaseT devices and the RX pair for10/100BaseT devices.

In 1000BaseT devices, the original 128 ns test pulse is cancelled by thecancellation circuit 59. The pulse received at the ADC output is thereflection. The test pulse preferably has 2V swing. Before testing, theoffset on the line is measured and is subtracted from the received ADCvalue.

Referring now to FIG. 6, the cancellation circuit 59, which can be ananalog hybrid circuit, does not perfectly cancel the test pulse. Toprevent false reflection identification, a 250 mv floor within 32 clockcycles (125 Mhz clock) and a 62.5 mv floor after 32 clock cycles areused to allow a residual of cancellation of the test pulse and noise tobe filtered. The peak value on the line is detected for 5 μs. Theamplitude of reflection is the maximum magnitude that is detected. Theamplitude is adjusted according to the sign of the reflection. Thedistance to the reflection is located at 50% of the peak.

The cable status is determined by comparing the amplitude and thecalculated cable length to the lookup table 56 for the type of cablebeing tested. The measured reflection amplitude falls into a window.There are two adjustable thresholds for open circuit and short circuitcable. The open threshold is preferably based on experimental data,which can be produced by refection amplitudes for CAT3 and CAT5 cablethat is terminated with a first impedance value such as 333 Ohms.

The default short circuit threshold is based on experimental data ofrefection amplitudes for CAT3 and CAT5 cable that is terminated with asecond impedance value such as a 33 Ohms. As can be appreciated, thelookup table 56 may contain data for other cable types. Other impedancevalues may be used to generate the thresholds.

If measured amplitude falls between open and short circuit thresholds,the cable status is declared normal. If the amplitude is above the openthreshold, the cable status is declared an open circuit. If theamplitude is below a short circuit threshold, the cable status isdeclared a short circuit. The cable status, reflection amplitude andcable distance are stored and/or displayed.

In the second test state machine, the original test pulse is notcancelled. Both the original pulse and the reflection are monitored.When an open circuit is located near the cable tester, the two pulsesmay be overlapping, which may cause saturation in the ADC. The teststate machine preferably sends out a 128 ns pulse that has a 1V swing.The offset on the line is measured and subtracted from the received ADCvalue. A 250 mv floor is used within 32 clock cycles (125 Mhz clock) anda 62.5 mv floor is used after 32 clock cycles so that the residual ofcancellation and noise can be filtered. Signals below the floor areconsidered to be 0. The peak value on the line is detected for 5 μs. Ascan be appreciated, the test pulse can have longer or shorter durationsand amplitudes.

The first peak that is observed should be the test pulse. The amplitudeof reflection is the maximum magnitude detected after the test pulse isdetected. The distance of reflection is at 50% cutoff of the peak. Ifanother pulse is not detected after the test pulse and the magnitude ofthe test pulse when the counter 17 reaches a preset threshold, isgreater than a preset threshold, the cable tester decides whether thereis an open cable that is located relatively close or a perfectlyterminated cable by sending a second test pulse that has one-half of themagnitude of the first test pulse.

If the maximum magnitude on the line is greater than ¾ of the originalpulse, there is an open circuit that is located relatively close.Otherwise, if the first peak is detected after a predetermined number ofclock cycles, the cable tester 20 declares an open circuit. If the firstpeak is within after the predetermined number of clock cycles, the cabletester 20 declares a perfectly terminated cable. In one exemplaryembodiment, the predetermined number of clock cycles is 33.

The cable status is determined by comparing the amplitude and distanceof reflection to the lookup table 56 based on the type of cable beingtested. There are two adjustable thresholds for open and short circuitcable. The default open threshold is from the experimental data ofrefection amplitudes for CAT3 and CAT5 cable terminated with a firstimpedance value such as 333 Ohms. The default short circuit threshold isfrom the experimental data of refection amplitude of CAT3 and CAT5 cablethat is terminated with a second impedance value such as 33 Ohms. Otherimpedance values may be employed for generating thresholds.

If the measured amplitude falls between open and short circuitthresholds, the cable status is declared normal. If the amplitude isabove the open circuit threshold, the cable status is declared an opencircuit. If the amplitude is below a short circuit threshold, the cablestatus is declared a short circuit. The cable status, reflectionamplitude and cable length are stored and/or displayed.

Referring now to FIG. 8, the cable tester can be implemented in anexemplary network device 300 that includes a physical layer device 308and a cable tester or cable test module (CTM) 312, as described above.The network device 300 can be a switch 304 that includes an n portphysical layer device 308 and a cable test module (CTM) 312. While theswitch 304 is shown, any other network device 300 that contains aphysical layer device, a port and the CTM can be used. For example, thenetwork device 300 may be a network appliance, a computer, a switch, arouter, a fax machine, a telephone, a laptop, etc.

Cables 314-1, 314-2, . . . , and 314-n can be connected to the switch304 using connectors 318-1, 318-2, . . . , and 318-n, such as RJ-45connectors or any other suitable connector type. The switch 304 can beconnected to other network devices such as, but not limited to,computers, laptops, printers, fax machines, telephones and any othernetwork device or network appliance.

In the embodiment shown in FIG. 8, the network device 300 includes asoftware or hardware based switch 324 that is used to trigger the cabletest during operation. The network device 300 also includes one or morelight emitting diodes (LEDs) 326-1, 326-2, . . . , and 326-n. If asingle LED per port is used, the LEDs 326 are fully burdened duringnormal use. For example, the LEDs 326 are used to display the presenceor absence of a link, link speed, link activity and other informationduring normal (non-cable-testing) use. While LEDs are shown, any otheraudio and/or visual indicator can be used. For example, audible tonesfrom a speaker or other audio device can be used to indicate cablestatus. If the network device includes illuminated switches, theillumination of the switches can be flashed, brightened, dimmed orotherwise used to indicate cable status. Still other indicators includeincandescent lights.

Referring now to FIG. 9, steps for operating the network device 300 areshown generally at 330. Control begins with step 332. In step 334,control determines whether the test switch 324 has been pushed. If thetest switch has not been pushed, control loops back to step 334.Otherwise, control continues with step 336 where control sets the portequal to 1.

Control determines whether the link associated with a current port is upin step 338. If not, control performs the cable test on the designatedport in step 340. Control continues from step 340 or step 338 (if true)with step 342 where control determines whether all ports have beentested. For example, the cable may include four ports that areassociated with four pairs of twisted wire, although additional or fewerports and pairs can be used. If not, control continues with step 344,increments the port, and continues with step 338. If all ports aretested as determined in step 342, control displays the results for thetested port(s) in step 346 using the LEDs and control ends in step 348.If the network device 300 has only one port, steps 336, 342 and 344 canbe skipped. As can be appreciated by skilled artisans, the cable testcan be executed sequentially for each port as set forth above orsimultaneously for all ports. For simultaneous operation, additionalcable test modules or portions thereof may need to be duplicated.

Referring now to FIGS. 10A and 10B, additional steps are performed whenthe network device may be connected to power over Ethernet (POE) devicesor data terminal equipment (DTE), which will be collectively referred toherein as POEs. Examples of POEs include computers (notebooks, serversand laptops), equipment such as smart videocassette recorders, IPtelephones, fax machines, modems, televisions, stereos, hand-helddevices, or any other network device requiring power to be supplied overthe cable. These devices typically include a filter or other circuitthat is connected across center taps of transformers at the POE end ofthe cable. If not accommodated by the cable test module, the filters orother circuits that are used by the POEs may cause the cable test togenerate inaccurate results.

Referring now to FIG. 10A, an exemplary network device 350 providescable power to an exemplary cable-powered POE 351. The network device350 includes a controller 352 that communicates with a signal generator353, a detector 354 and a selector switch 355. The signal generator 353communicates with a transmitter 356 having an output that communicateswith a secondary of a transformer 357. The detector 354 communicateswith a receiver 359 having an input that communicates with a secondaryof a transformer 360. The selector switch 355 selectively connectscenter taps of primaries of the transformers 357 and 360 to a powersource 361.

Pair A of a cable 362 communicates with a primary of a transformer 363.A secondary of the transformer 363 communicates with a selector switch364, which selects either a receiver 365 or a filter 366. Pair B of thecable 362 communicates with a primary of a transformer 367. A secondaryof the transformer 367 communicates with the selector switch 364, whichselects either the transmitter 368 or the filter 366.

A load 371 and a controller 372 are connected across center taps of theprimaries of the transformers 363 and 367. The load 371 includes, forexample, the load of the receiver 365, the transmitter 368 and othercircuits in the cable-powered POE device 351. The controller 372controls the position of the selector switch 364. In a de-energizedstate or when power is not supplied over data the cable 362, theselector switch 364 connects the secondaries of the transformer 363 and367 to the filter 366. Typically the filter 366 is a low-pass filter.

The controller 372 detects when the network device 350 supplies power tothe cable 362. Since the load 371 is in parallel with the controller372, power is also supplied to the load 371 at the same time as power issupplied to the controller 372. When power is supplied to the controller372, the selector 364 is controlled to connect the secondary of thetransformer 363 to the receiver 365 and the secondary of transformer 367to the transmitter 368. At substantially the same time, power issupplied to the receiver 365, the transmitter 368 and the other circuitsof cable-powered POE device 351. At this point, the cable-powered POEdevice 351 can begin autonegotiating with the network device 350.

The cutoff frequency of the low-pass filter 366 filters out fast linkpulses (FLPs). Without the filter 366, when the POE 351 communicateswith a non-POE enabled network device, the FLPs generated by the non-POEnetwork device could be sent back to the non-POE network device. Thenon-POE network device may receive the FLPs that it sent and attempt toestablish a link with itself or cause other problems. The filter 366will also adversely impact the cable test. Thus, the network device 350transmits test signals having pulse widths greater than FLPs, which willpass through the low-pass filter 352. Once the selector switch closes,the network device 350 performs cable testing.

For additional details concerning these and other POE devices, see“Method and Apparatus for Detecting and Supplying Power by a FirstNetwork Device to a Second Network Device”, U.S. patent application Ser.No. 10/098,865, filed Mar. 15, 2002, and “System and Method forDetecting A Device Requiring Power”, WO 01/11861, filed Aug. 11, 2000,which are both incorporated by reference in their entirety.

Referring now to FIG. 10B, steps for performing the cable test when thenetwork device may be connected to POE devices are shown generally at380. Common steps from FIG. 9 have been identified using the samereference number. If the link is not up in step 338, control continueswith step 382 where control determines whether the filter 366 isdetected. Is false, control continues with step 340 as described above.If the filter 366 is detected, control powers up the POE device in step384. In step 386, control determines whether the selector switch 355 ison. If not, control loops back to step 386. Otherwise, control continueswith step 340 as described above.

Referring now to FIG. 11, a network device 400 includes a physical layerdevice 408 and a cable tester 412, as described above. For example, thenetwork device 400 can be a switch 404 that includes an n port physicallayer device 408 and a cable test module (CTM) 412. However, any othernetwork device that contains a physical layer device can be used. Cables314-1, 314-2, . . . , and 314-n can be connected to the switch 404 usingconnectors 318-1, 318-2, . . . , and 318-n, such as RJ-45 connectors orany other suitable connector type. The switch 404 can be connected toother network devices such as, but not limited to, computers, laptops,printers, fax machines, telephones and any other network device or POE.In the embodiment shown in FIG. 11, the network device 400 initiates thecable test when powered on by a power supply 416. The cable test can beinitiated manually and/or automatically on power up. The network device400 also includes one or more LEDs 326-1, 326-2, . . . , and 326-n.

Referring now to FIG. 12, steps for operating the network device 400 areshown generally at 430. Control begins with step 432. In step 434,control determines whether power is on. When power is on, control sets aport equal to 1 in step 436. In step 438, control performs the cabletest as described above. In step 440, control determines whether all ofthe ports have been tested. If not, control increments the port andreturns to step 438. If the network device has only one port, the steps436, 440 and 442 may be skipped. Otherwise, control displays the resultsin step 444 and control ends in step 446. As can be appreciated byskilled artisans, the cable test can be executed sequentially for eachport as set forth above or simultaneously for all ports.

Referring now to FIG. 13, additional steps are performed when thenetwork device may be connected to power over Ethernet (POE) devices asshown generally at 460. Common steps from FIG. 12 have been designatedusing the same reference number. In step 470, control determines whetherthe filter 466 is detected. If false, control continues with step 438 asdescribed above. If a filter is detected, control powers up the POEdevice in step 474. In step 478, control determines whether the switchis on. If not, control loops back to step 478. Otherwise, controlcontinues with step 438 as described above.

Referring now to FIGS. 14A–14E, control successively tests each port.Each port may be associated with one or more LEDs. During normaloperation, the LEDs are used to indicate the presence or absence of alink, link activity, link speed or any other information. These sameLEDs are also used to indicate testing in progress and the results ofthe cable test. As can be appreciated, other than the addition of thecable test module, no other hardware needs to be added.

When testing, the CTM may optionally turn on, turn off, or blink one ormore of the LEDs to designate that a cable test is occurring on theassociated port. Each of the ports are tested one or more timessequentially, randomly or in any order. When the tests are complete, thenetwork device indicates the results using the LEDs, for example asshown in FIG. 15. For example, turning on the LED associated with a portindicates that a good cable communicates with the port. Turning the LEDoff indicates an open circuit. Blinking the LED indicates a short. Ascan be appreciated, the on, off and blinking states or speed and LEDcolor can be assigned in a different manner to cable states of good,open, and short. The LEDs can be monochrome or color. Color LEDs can beused to indicate additional information such as the relative location ofthe failure (such as near, intermediate, far or other distance ranges),the identification of the signal pair with the fault, whether the faultrelates to impedance mismatch, and/or the magnitude of the measuredimpedance (such as low, medium, high, open). By using existing, fullyburdened LEDs to indicate the results of the cable test, the presentinvention provides lower cost network devices with built-in cabletesting. While only one LED per port is shown in FIGS. 14 and 15, thenetwork device may also include additional LEDs that are associated witheach port as shown in FIG. 16.

Referring now to FIG. 8 and FIG. 17, the cable test module 312 may beoperated in an alternate mode. The cable test module 312 transmits atest pulse on a test pair and checks for reflected signals on all of thepairs. As can be appreciated, if a return signal above a predeterminedfixed and/or variable threshold is received on pairs other than the testpair, the cable test module 312 signals a short circuit between the testpair and the pair with the return signal above the predeterminedthreshold. The predetermined threshold is set above expected crosstalklevels.

Referring now to FIG. 17, control begins with step 500. In step 502,control sets Pair X=1. In step 504, control transmits a test pulse onPair X. In step 506, signals are received on all pairs. In step 508, ifX=1, then Y=2 otherwise Y=1. The signal received on Pair Y is comparedto the threshold in step 510. In step 512, control determines whetherthe received signal is greater than the threshold value. If not, controlcontinues with step 514 and reports a “no short” status between Pair Xand Pair Y. In step 516, if X=Y+1, then Y=Y+2, else Y=Y+1. In step 518,control determines whether Y is greater than the total number of pairs.If not, control continues with step 510. If step 512 is true, controlcontinues with step 520 and reports a short status between Pair X andPair Y and declares a failed cable test for the port. If step 518 istrue, X is incremented and control continues with step 504. If thenetwork device has additional ports, such as in a switch, the otherports are tested in a similar manner.

If the cable fails the test, the CTM sends a signal to the PHY 308,which shuts down the port that is associated with the failed pair(s).After a predetermined off period, the CTM powers up the port andperforms the cable test on the pairs. As can be appreciated, poweringdown the failed port reduces power consumption. Alternatively, the CTMcan automatically downshift to a lower speed using fewer pairs, as willbe described below.

Referring now to FIG. 18, the powerdown steps according to the presentinvention are shown in further detail. Control begins in step 550. Instep 552, control determines whether the cable test (FIG. 17) iscomplete. If not, control loops back to step 552. Otherwise controlcontinues with step 554 where control determines whether all portspassed the test. If true, control continues with step 552. Otherwise,control starts a timer in step 556. In step 558, control powers down thefailed port(s). In step 560, control determines whether the timer is up.If not, control loops back to step 560. Otherwise, control continueswith step 564 and powers up the failed ports. In step 566, controlinitiates the cable test (FIG. 17 and/or other tests described herein)in step 566.

Referring now to FIG. 19, the CTM operates the cable test B times oneach pair where B is greater than or equal to two. The CTM requires Aout of B cable tests to pass (and/or fail) before the CTM declares atest pass (and/or fail). In addition to and/or instead of A out of Bcriteria, the CTM may also perform mathematical, Boolean or othercalculations on the results to increase the accuracy of the results. Asa non-limiting example, the distance, reflected amplitude, reflectedtiming and/or attenuation results of the multiple tests may be averagedbefore using the lookup tables. Alternately, the highest and/or lowestresults can be disregarded and the calculation can be made on theremaining results.

In FIG. 19, steps for implementing the A out of B test criteriaaccording to the present invention are shown. Control begins with step580. In step 582, control sets D=0 and C=1. In step 584, controlperforms the cable test. In step 586, control determines whether thecable passes the cable test. If true, control continues with step 588and sets D=D+1. Control continues from step 588 to step 590 anddetermines whether C=B. If not, control increments C in step 592 andcontinues with step 592. If step 590 is true, control continues withstep 594 and determines whether D≧A. If true, the cable passes the testin step 596. If false, the cable fails the test in step 598. As can beappreciated, similar procedures can be used to determine A out of Bfailures of a condition.

Referring now to FIG. 20, the cable test module performs calculations onmultiple tests. The cable test module compares the calculation tothresholds to determine the pass/fail status. Control begins in step600. In step 602, control sets X=1. In step 604, the cable test isperformed and the results are stored. In step 606, control determineswhether X=B. If not, control returns to step 604. Otherwise, controlcontinues with step 608 and performs a calculation on the storedresults. In step 610, the calculation is compared to a lookup table(LUT) or a stored threshold. In step 612, control determines whether thecalculated value is less than the lookup table value or the storedthreshold. If true, control continues with step 614 and declares thatthe cable test is passed. If step 612 is false, control declares thatthe cable test is failed. As can be appreciated, the test in step 612can use other functional operations such as greater than, less than orequal to, greater than or equal to, equal and/or any other suitablemathematical or Boolean operator. For example, the calculation in step612 can be average attenuation.

The cable testing is typically performed before establishing a link. Theresults of the cable test are used according to the present invention todecrease the time required to establish a link. More particularly, atimer that is used to break the link prior to starting the cable testcan be toggled on or off. By allowing the timer to turn on or off, theamount of time that is required for a test can be reduced when it isknown that there is no active link partner.

For example, a link partner is not present when the cable is connectedat one end only. Referring now to FIG. 21, an additional state is addedaccording to the present invention to the state machine that is setforth in FIG. 3. If the TDR test is enabled and TIMEROFF=TRUE, the statemachine transitions from the WAIT_EN state 102 to a NO_WAIT_PWRDN state630. The CTM sets the TIMEROFF=TRUE when a pair fails the cable test. Inthe NO_WAIT_PWRDN state 630, testover is set equal to 0 and the statemachine transitions to the TIMER1_START state 104. If the TDR test isenabled and TIMEROFF=FALSE, (when the cable passes the cable test) thestate machine transitions from the WAIT_EN state 102 to the WAIT_PWRDNstate 102, as previously described above.

Referring now to FIGS. 22, 23 and 24, the cable tester transmits awaveform on one pair. An echo canceller circuit of a digital signalprocessor (DSP) that is associated with the pair performs echocancellation. Crosstalk circuits that are associated with the otherpairs of the cable perform crosstalk cancellation. The cable test modulereads taps of finite impulse response (FIR) filters in the echo andcrosstalk cancellers. The locations of the echo and crosstalk areidentified according to the present invention and displayed. A link doesnot need to be established.

More particularly in FIG. 22, a physical layer device includes a firstDSP 650-1 with an echo canceller circuit 652-1 and crosstalk circuits654-1, 656-1 and 658-1. The DSP 650-1 is associated with a first pair ofa cable 659. Suitable DSP designs can be found in “Movable Tap FiniteImpulse Response Filter”, U.S. patent Ser. No. 09/678,728, filed Oct. 4,2000 and “Finite Impulse Response Filter” U.S. Patent Ser. No.60/217,418, filed Jul. 11, 2000, which are both hereby incorporated byreference in their entirety. The crosstalk circuits 654-1, 656-1 and658-1 measure and cancel crosstalk on the first pair that is due to thesecond pair (1:2), crosstalk on the first pair that is due to the thirdpair (1:3), and crosstalk on the first pair that is due to the fourthpair (1:4), respectively. The echo canceller circuit 652-1 includes afinite impulse response (FIR) filter 660-1 having taps 662-1. Thecrosstalk circuits 654-1, 656-1 and 658-1 also include FIR filters 664-1with taps 666-1.

A second DSP 650-2 includes an echo canceller circuit 652-2 andcrosstalk circuits 654-2, 656-2 and 658-2. The DSP 650-2 is associatedwith a second pair of the cable 659. The crosstalk circuits 654-2,656-2, 658-2 measure and cancel crosstalk on the second pair that is dueto the first pair (2:1), crosstalk on the second pair that is due to thethird pair (2:3), and crosstalk on the second pair that is due to thefourth pair (2:4), respectively. The echo canceller and crosstalkcircuits 652-2, 654-2, 656-2 and 658-2 likewise include finite impulseresponse (FIR) filters and taps.

A third DSP 650-3 includes an echo canceller circuit 652-3 and crosstalkcircuits 654-3, 656-3 and 658-3. The DSP 650-3 is associated with athird pair of the cable 659. The crosstalk circuits 654-3, 656-3, and658-3 measure and cancel crosstalk on the third pair that is due to thefirst pair (3:1), crosstalk on the third pair that is due to the secondpair (3:2), and crosstalk on the third pair that is due to the fourthpair (3:4), respectively. The echo canceller and crosstalk circuits652-3, 654-3, 656-3 and 658-3 likewise include finite impulse response(FIR) filters and taps.

A fourth DSP 650-4 includes an echo canceller circuit 652-4 andcrosstalk circuits 654-4, 656-4 and 658-4. The DSP 650-4 is associatedwith a fourth pair of the cable 659. The crosstalk circuits 654-4,656-4, and 658-4 measure and cancel crosstalk on the fourth pair that isdue to the first pair (4:1), crosstalk on the fourth pair that is due tothe second pair (4:2), and crosstalk on the fourth pair that is due tothe third pair (4:3), respectively. The echo canceller and crosstalkcircuits 652-4 and 654-4 likewise include finite impulse response (FIR)filters and taps.

Referring now to FIGS. 22, 23, and 24, the test waveform such as a1000BASET waveform is transmitted on one pair of the cable 660 such asthe first pair. A CTM 670 reads taps of FIR filters of the echocanceller 652-1 of the first pair and the taps of the FIR filters of thecrosstalk canceller circuits 654-2, 654-3 and 654-4 (2:1, 3:1, and 4:1)that are associated with the other pairs. In other words, the CTM 670identifies the echo and the crosstalk components by reading the taps ofthe FIR filters. The CTM 670 identifies a distance to echo and thecrosstalk components and their respective amplitudes and stores theinformation in memory. The CTM 670 outputs the data via a display 674.

Referring now to FIG. 25, a network device 700 includes a physical layerdevice 702 that is connected to a cable medium 704. The cable mediumincludes multiple pairs of twisted pair wires. The physical layer device702 includes a polarity detector circuit 706 that detects a polarity ofeach pair. The polarity detector circuit 706 determines whether linkpulses of the pair are positive-going or negative-going. If the linkpulse is negative-going, the polarity detector circuit 706 swaps thepairs. Swap status data is stored in memory that is associated with thephysical layer device 702, the polarity detector circuit 706, or in anyother suitable device. A cable test module 707 accesses the swap statusdata for output to a display 708.

The physical layer device 702 further includes a skew detector circuit710. The skew detector circuit 710 determines whether one pair is longerthan the other pair and then inserts digital delays to equalize thetiming of the pairs. The skew detector circuit 710 stores the calibrateddigital delay in memory that is associated with the physical layerdevice, the skew detector circuit 710, or any other suitable device. Thecable test module 707 accesses and displays the skew data for each pair.

The physical layer device 702 further includes a cable crossing detectorcircuit 714. The cable crossing detector circuit 714 determines whetherany of the pairs of wires are crossed. The cable crossing detectorcircuit 714 stores the cable crossing status in memory that isassociated with the physical layer device, the cable crossing detectorcircuit 714, or any other suitable device. The cable test module 707accesses and displays the cable crossing data for each pair.

Referring now to FIG. 26, the cable test module according to the presentinvention estimates insertion loss. Control begins with step 800. Instep 802, control determines whether echo and crosstalk circuits of theDSP have settled. If not, control loops back to step 802. In step 804,control determines the partial response of the transmitter T(D) in thedigital domain. In step 806, an analog low pass filter gain LPF(D) inthe digital domain is determined. In step 808, an analog gain G_(A) isdetermined. In step 810, a digital gain G_(D) is determined. In step812, a feed forward equalizer gain FFE(D) in the digital domain isdetermined. In step 814, a feedback equalizer FB(D) in the digitaldomain is determined. In step 816, insertion loss is estimated based onthe following relationship:

${H(D)} = \frac{1 + {{FB}(D)}}{{T(D)}{{LPF}(D)}G_{A}G_{D}{{FF}(D)}}$

In step 818, the estimated insertion loss H(D) is compared to athreshold. The threshold can be generated by a stored threshold, alookup table, or a mathematical relationship. If the insertion loss H(D)is greater than the threshold, the pair fails the insertion loss test instep 820. Otherwise, the pair passes the insertion loss test in step822. Control ends in step 824. The test is performed in series and/orparallel for the pairs. If one or more of the pairs of the cable failsthe insertion loss test, the physical layer device can automaticallydownshift to lower speeds, as will be described below.

Referring now to FIG. 27, the cable test module according to the presentinvention also estimates return loss R(D). Control begins with step 840.In step 842, control determines whether echo and crosstalk circuits ofthe DSP have settled. If not, control loops back to step 842. In step844, control determines the partial response of the transmitter T(D) inthe digital domain. In step 846, an analog LPF gain LPF(D) in thedigital domain is determined. In step 848, an analog gain G_(A) isdetermined. In step 850, control determines the response of the echocanceller Echo(D) in the digital domain. In step 852, the return loss isestimated based on the following equation:

${R(D)} = \frac{{Echo}(D)}{{T(D)}{{LPF}(D)}G_{A}}$

In step 854, the estimated return loss R(D) is compared to a threshold.The threshold can be generated by a stored threshold, a lookup table ora mathematical relationship. If the return loss is greater than thethreshold, the pair fails the insertion loss test in step 856.Otherwise, the pair passes the insertion loss test in step 858. Controlends in step 860. The test is performed in series and/or in parallel forthe pairs. If one or more of the pairs of the cable fails the returnloss test, the physical layer device can automatically downshift tolower speeds, as will be described.

Referring now to FIGS. 28A, 28B and 29, the cable test module accordingto the present invention uses the digital gain of the DSP after settlingto estimate cable length. In FIG. 28A, digital gain is calibrated as afunction of cable length for a particular type of cable in step 870. Forexample, CAT 5 cable is calibrated. In step 872, a digital gain/cablelength lookup table or mathematical relationship is created based on thecalibration. In step 874, the mathematical relationship or lookup tableis stored in memory of the physical layer device, the network deviceand/or the cable tester. A typical lookup table is shown in FIG. 28B. Anapproximately exponential relationship is shown. To reduce the cost ofestimating the cable length, the lookup table can be simplified by amathematical relationship that approximates the actual relationship withsome loss in accuracy.

In FIG. 29, the lookup table and/or mathematical relationship is used toestimate cable length after the digital gain of the DSP settles. Controlbegins in step 880. In step 882, control determines whether the digitalgain of the DSP has settled. If not, control loops back to step 882.Otherwise, control continues with step 884 and reads the digital gainfrom the DSP. In step 886, the digital gain is used to estimate thecable length using the lookup table or the mathematical relationship.

Referring now to FIGS. 30A, 30B and 31, the cable tester according tothe present invention uses the reflection amplitude to estimate theimpedance of the cable. In FIG. 30A, the impedance is calibrated as afunction of reflection amplitude for a particular type of cable in step900. For example, the cable can be CAT 5. In step 902, a reflectionamplitude/impedance lookup table or mathematical relationship is createdbased on the calibration. In step 904, the lookup table or relationshipis stored in memory of the physical layer device, the network device,and/or the cable tester. A typical lookup table is shown in FIG. 30B. Toreduce the cost of implementing the cable tester with the impedanceestimator, the lookup table can be simplified by a mathematicalrelationship that estimates the actual values.

Referring now to FIG. 31, the cable tester inputs the reflectionamplitude to the lookup table and/or mathematical relationship, whichoutput an estimated cable impedance. Control begins in step 910. In step912, control determines whether the reflection amplitude is measured. Ifnot, control loops back to step 912. Otherwise, control continues withstep 914 and reads the reflection amplitude from the DSP. In step 916,the reflection amplitude is used to estimate the impedance using thelookup table or the mathematical relationship. Control ends in step 920.As with the insertion loss and return loss described above, theimpedance can be compared to a threshold. Pass/fail decisions and/ordownshift decisions can be made based on the estimated impedance.

Referring now to FIGS. 32A and 32B, the cable test module and anautonegotiation circuit according to the present invention automaticallydownshift from a higher speed to a lower speed when faulty pairs arefound. In “Apparatus And Method For Automatic Speed Downshift For A TwoPair Cable”, U.S. patent application Ser. No. 09/991,043, Filed Nov. 21,2001, which is hereby incorporated by reference in its entirety,automatic speed downshift from 1000 Mbps to 10/100 Mbps is performed ifautonegotiation is not successful at 1000 Mbps. For example, if thecable test module determines that one or two of the four pairs have anopen or short status, the cable test module and autonegotiation circuitdownshift and the link is brought up at 10/100 Mbps speeds on the twooperable pairs. As can be appreciated, attempting to establish the linkat 1000 Mbps takes time. The cable test is run prior to autonegotiation.Therefore if the cable test identifies a faulty pair, the cable testersends a message to the autonegotiation circuit to downshift beforeattempting autonegotiation at 1000 Mbps, which reduces the amount oftime required to establish the link (at the lower speed). While 1000Mpbs and 10/100 Mbps link rates are described, skilled artisans canappreciate that the present invention applies to other link speeds andother numbers of pairs.

In FIG. 32A, a first network device 950 includes a physical layer 952and a second network device 952 includes a physical layer 953. A cable954 includes four pairs of twisted pair wires. The physical layer 952includes a cable test module 958 and an autonegotiation circuit 960. InFIG. 32B, control begins in step 970. In step 972, the cable test is runby the cable test module 958 as described herein. In step 974, controldetermines whether the cable test module found an open or short cablestatus. If an open or short cable status is found, the cable test modulesends a message to the autonegotiation circuit to downshift in step 976and control ends in step 980. As was described above, other criteria maybe used to trigger a downshift such as impendence, return loss,insertion loss and/or other calculated parameters. If step 974 is false,control ends in step 980. Since the decision to downshift has alreadybeen made, the autonegotiation circuit brings the link up at the lowerspeed more quickly.

Referring now to FIG. 33, the cable test module of a physical layerdevice 1000 is used to calculate skew. The physical layer device 1000includes DSPs 1002A and 1002B that are associated with pairs A and B. Ascan be appreciated, additional pairs C and D can also be provided. TheDSPs 1002A and 1002B include echo cancellers 1004A and 1004B,respectively, which include FIR filters 1006A and 1006B with taps 1010Aand 1010B, respectively. After settling of the echo cancellers 1004A and1004B, the values of the respective taps 1010A and 1010B are used tocalculate skew between the pairs. In other words, the difference in thelocation of tap values is related to skew.

Referring now to FIG. 34, the steps for calculating skew are shown.Control begins in step 1020. In step 1024, control determines whetherthe echo cancellers 1004A and 1004B have settled. If not, control loopsback to step 1024. If step 1024 is true, control continues with step1026 and reads the values of the taps 1010A and 1010B of the echocancellers 1004A and 1004B, respectively. In step 1028, controlestimates the skew between the pairs A and B. Control ends in step 1030.As can be appreciated, skew can be calculated between additional pairs(A and C, A and D, B and D, and C and D) if desired.

Referring now to FIGS. 35 and 36, the cable test module calculatesinsertion loss using a frequency synthesizer according to the presentinvention. A switch 1050 includes a multiple port physical layer device1054 with a cable test module 1056. The cable test module 1056 includesa frequency synthesizer 1060 that selectively generates tones that areoutput onto a cable 1062. The cable test module 1056 also receives thegenerated tones at the opposite end of the cable 1062. In other words,the cable 1062 has one end that is connected to a first port 1064 and anopposite end that is connected to another port 1066 of the switch 1050.The cable test module 1056 includes an insertion loss calculator 1070that calculates insertion loss as a function of frequency. In FIG. 35, aswitch triggers the cable test. In FIG. 36, the cable test is triggeredat power on and/or in other circumstances described above.

Referring now to FIGS. 37A and 37B, a first network device 1100 includesa physical layer device 1101 with a cable test module 1102. The cabletest module 1102 is used to identify when a second network device 1104with a physical layer device 1106 is disconnected from the cable 1108.In FIG. 37B, control begins with step 1140. In step 1142, controldetermines whether a link between the network devices 1100 and 1104 islost. If not, control returns to step 1142. Otherwise, control performsthe cable test in step 1144. In step 1146, control determines whetherthe cable status is open. If true, control reports a disconnectednetwork device and control ends in step 1150. If false, control endswithout reporting, or control may report that the network device isconnected. The network device 1100 can be a switch, a router or othermultiport device that reports the disconnection of one device to one ormore other connected devices. As can be appreciated, by reporting theoccurrence of disconnections, network security can be maintained. Thecable test can be delayed for a predetermined amount of time after thelink is lost using a timer if desired.

The lookup tables disclosed herein can be implemented in software. Ifimplemented in software, the lookup tables can be updated and/or changedafter manufacture to accommodate other types of cable such as CAT 6, CAT7, etc. The updates can be made using any conventional data transfermethod. Removable media such as smart chips can also be used. To reducethe cost of implementing the lookup tables disclosed herein, one or morefixed thresholds or simple mathematical relationships can be used toreduce the cost of the cable tester. While the results will be somewhatless reliable, the implementation costs will be significantly reduced.

The cable test device can be implemented in a physical layer device ofan Ethernet network device. The Ethernet network device is preferably an802.3 ab compliant device which can operate in 10 Megabits per second(Mbps), 100 Mbps and/or 1000 Mbps modes depending upon characteristicsof the link and/or link partners.

Those skilled in the art can now appreciate from the foregoingdescription that the broad teachings of the present invention can beimplemented in a variety of forms. Therefore, while this invention hasbeen described in connection with particular examples thereof, the truescope of the invention should not be so limited since othermodifications will become apparent to the skilled practitioner upon astudy of the drawings, the specification and the following claims.

1. A physical layer device that communicates over a cable, comprising: acable tester that determines a cable status, which includes an openstatus, a short status and a normal status, wherein said cable testerincludes: a pretest module that senses activity on the cable andselectively enables testing based on said sensed activity; and a testmodule that is enabled by said pretest module, transmits a test pulse onthe cable, measures a reflection amplitude, calculates a cable length,and that determines said cable status based on said measured amplitudeand said calculated cable length; a digital signal processor (DSP) thatcommunicates with the cable and that has a digital gain parameter; and acable length estimator that communicates with said DSP and thatestimates cable length based on said digital gain parameter.
 2. Thephysical layer device of claim 1 further comprising an indicator fordisplaying at least one of said cable status, said estimated cablelength, said calculated cable length and said measured reflectionamplitude.
 3. The physical layer device of claim 1 wherein said physicallayer device is implemented in a network device.
 4. The physical layerdevice of claim 1 wherein said cable tester is integrated with saidphysical layer device in a single integrated circuit.
 5. The physicallayer device of claim 1 wherein said physical layer device includes acable length lookup table that outputs a cable length based on saiddigital gain parameter.
 6. The physical layer device of claim 1 furthercomprising a lookup table that includes a plurality of sets ofreflection amplitudes as a function of cable length, wherein said cabletester determines said cable status using said lookup table, saidreflection amplitude and at least one of said calculated and estimatedcable length, wherein said sets of reflection amplitudes define aplurality of windows including a first window that is defined by firstand second thresholds, wherein said first threshold is based on a firstset of reflection amplitudes that are measured as a function of cablelength when a test cable type is an open circuit, and wherein saidsecond threshold is based on a second set of reflection amplitudes thatare measured as a function of cable length when said test cable type isterminated using a first impedance having a first impedance value. 7.The physical layer device of claim 1 wherein said cable tester enablestesting of a first pair of said cable if, during said first period,activity is detected on said first pair and is subsequently not detectedon said first pair for a second period after said activity is detected.8. The physical layer device of claim 1 wherein said cable testermeasures offset, subtracts said offset from said reflection amplitude,and zeroes said reflection amplitude below a floor.
 9. The physicallayer device of claim 1 wherein said cable tester measures offset,subtracts said offset from said reflection amplitude, and detects peaks,and wherein if a second peak is not detected after a first peak and saidreflection amplitude of said first peak is greater than a firstthreshold, said cable tester transmits a second test pulse having asecond amplitude that is less than a first amplitude of said test pulse.10. A physical layer device that communicates over a cable, comprising:cable testing means for determining a cable status, which includes anopen status, a short status and a normal status, wherein said cabletester includes: pretest means for sensing activity on the cable and forselectively enabling testing based on said sensed activity; and testmeans that is enabled by said pretest module, for transmitting a testpulse on the cable, for measuring a reflection amplitude, forcalculating a cable length, and for determining said cable status basedon said measured amplitude and said calculated cable length; digitalsignal processor (DSP) means for communicating with the cable and havinga digital gain parameter; and cable length estimating means thatcommunicates with said DSP means for estimating cable length based onsaid digital gain parameter.
 11. The physical layer device of claim 10further comprising indicating means for displaying at least one of saidcable status, said estimated cable length, said calculated cable lengthand said measured reflection amplitude.
 12. The physical layer device ofclaim 10 wherein said physical layer device is implemented in a networkdevice.
 13. The physical layer device of claim 10 wherein said cabletesting means is integrated with said physical layer device in a singleintegrated circuit.
 14. The physical layer device of claim 10 whereinsaid physical layer device includes a cable length lookup table thatoutputs a cable length based on said digital gain parameter.
 15. Thephysical layer device of claim 10 further comprising storing means forstoring a plurality of sets of reflection amplitudes as a function ofcable length, wherein said cable testing means determines said cablestatus using said storing means, said reflection amplitude and at leastone of said calculated and estimated cable length, wherein said sets ofreflection amplitudes define a plurality of windows including a firstwindow that is defined by first and second thresholds, wherein saidfirst threshold is based on a first set of reflection amplitudes thatare measured as a function of cable length when a test cable type is anopen circuit, and wherein said second threshold is based on a second setof reflection amplitudes that are measured as a function of cable lengthwhen said test cable type is terminated using a first impedance having afirst impedance value.
 16. The physical layer device of claim 10 whereinsaid cable testing means enables testing of a first pair of said cableif, during said first period, activity is detected on said first pairand is subsequently not detected on said first pair for a second periodafter said activity is detected.
 17. The physical layer device of claim10 wherein said cable testing means measures offset, subtracts saidoffset from said reflection amplitude, and zeroes said reflectionamplitude below a floor.
 18. The physical layer device of claim 10wherein said cable testing means measures offset, subtracts said offsetfrom said reflection amplitude, and detects peaks, and wherein if asecond peak is not detected after a first peak and said reflectionamplitude of said first peak is greater than a first threshold, saidcable testing means transmits a second test pulse having a secondamplitude that is less than a first amplitude of said test pulse.
 19. Amethod for operating a physical layer device that communicates over acable, comprising: determining a cable status, which includes an openstatus, a short status and a normal status, wherein said determiningstep includes: sensing activity on the cable and selectively enablingtesting based on said sensed activity; and transmitting a test pulse onthe cable; measuring a reflection amplitude; calculating a cable length;determining said cable status based on said measured amplitude and saidcalculated cable length; communicating with a digital signal processor(DSP) having a digital gain parameter; and estimating cable length basedon said digital gain parameter.
 20. The method of claim 19 furthercomprising displaying at least one of said cable status, said estimatedcable length, said calculated cable length and said measured reflectionamplitude.
 21. The method of claim 19 further comprising: storing aplurality of sets of reflection amplitudes as a function of cablelength; and determining said cable status using said lookup table, saidreflection amplitude and at least one of said calculated and estimatedcable length, wherein said sets of reflection amplitudes define aplurality of windows including a first window that is defined by firstand second thresholds, wherein said first threshold is based on a firstset of reflection amplitudes that are measured as a function of cablelength when a test cable type is an open circuit, and wherein saidsecond threshold is based on a second set of reflection amplitudes thatare measured as a function of cable length when said test cable type isterminated using a first impedance having a first impedance value. 22.The method of claim 19 further comprising enabling testing of a firstpair of said cable if, during said first period, activity is detected onsaid first pair and is subsequently not detected on said first pair fora second period after said activity is detected.
 23. The method of claim19 further comprising: measuring offset; subtracting said offset fromsaid reflection amplitude; and zeroing said reflection amplitude below afloor.
 24. The method of claim 19 further comprising: measuring offset;subtracting said offset from said reflection amplitude; detecting peaks;and transmitting a second test pulse having a second amplitude that isless than a first amplitude of said test pulse if a second peak is notdetected after a first peak and said reflection amplitude of said firstpeak is greater than a first threshold.